package route

import (
	"ubt-gin-admin/app/api/controller/comm_ctrl"
	"ubt-gin-admin/app/api/controller/info_ctrl"
	"ubt-gin-admin/app/api/controller/sys_ctrl"

	"github.com/gin-gonic/gin"
)

func RegRoutes(router *gin.Engine) {
	// 一些通用的接口)
	router.GET("/common/img-code", comm_ctrl.CommCtrl.ImgCode)
	router.GET("/common/areas", comm_ctrl.CommCtrl.Areas)
	router.POST("/common/upload", comm_ctrl.CommCtrl.Upload)
	router.POST("/common/delete", comm_ctrl.CommCtrl.Delete)
	router.POST("/common/download", comm_ctrl.CommCtrl.Download)
	// 系统配置相关接口
	router.POST("/system/config/save", sys_ctrl.SysConfCtrl.Save)
	router.POST("/system/config/process", sys_ctrl.SysConfCtrl.Process)
	router.GET("/system/config/one", sys_ctrl.SysConfCtrl.One)
	router.GET("/system/config/page", sys_ctrl.SysConfCtrl.Page)
	router.GET("/system/config/select", sys_ctrl.SysConfCtrl.Select)
	// 菜单相关接口
	router.POST("/system/menu/save", sys_ctrl.SysMenuCtrl.Save)
	router.POST("/system/menu/deletes", sys_ctrl.SysMenuCtrl.Deletes)
	router.GET("/system/menu/one", sys_ctrl.SysMenuCtrl.One)
	router.GET("/system/menu/list", sys_ctrl.SysMenuCtrl.List)
	router.GET("/system/menu/select", sys_ctrl.SysMenuCtrl.Select)
	router.GET("/system/menu/tree", sys_ctrl.SysMenuCtrl.Tree)
	router.GET("/system/menu/sort", sys_ctrl.SysMenuCtrl.Sort)
	router.GET("/system/menu/menu", sys_ctrl.SysMenuCtrl.Menu)
	// 按钮相关接口
	router.POST("/system/button/save", sys_ctrl.SysBtnCtrl.Save)
	router.POST("/system/button/deletes", sys_ctrl.SysBtnCtrl.Deletes)
	router.GET("/system/button/one", sys_ctrl.SysBtnCtrl.One)
	router.GET("/system/button/page", sys_ctrl.SysBtnCtrl.Page)
	router.GET("/system/button/sort", sys_ctrl.SysBtnCtrl.Sort)
	// 角色相关接口
	router.POST("/system/role/save", sys_ctrl.SysRoleCtrl.Save)
	router.POST("/system/role/deletes", sys_ctrl.SysRoleCtrl.Deletes)
	router.GET("/system/role/one", sys_ctrl.SysRoleCtrl.One)
	router.GET("/system/role/page", sys_ctrl.SysRoleCtrl.Page)
	router.GET("/system/role/select", sys_ctrl.SysRoleCtrl.Select)
	// 用户相关接口
	router.POST("/system/user/login", sys_ctrl.SysUserCtrl.Login)
	router.GET("/system/user/session", sys_ctrl.SysUserCtrl.Session)
	router.POST("/system/user/exit", sys_ctrl.SysUserCtrl.Exit)
	router.POST("/system/user/save", sys_ctrl.SysUserCtrl.Save)
	router.POST("/system/user/process", sys_ctrl.SysUserCtrl.Process)
	router.POST("/system/user/personal", sys_ctrl.SysUserCtrl.Personal)
	router.GET("/system/user/one", sys_ctrl.SysUserCtrl.One)
	router.GET("/system/user/page", sys_ctrl.SysUserCtrl.Page)
	router.GET("/system/user/select", sys_ctrl.SysUserCtrl.Select)
	// 数据字典相关接口
	router.POST("/system/dict/save", sys_ctrl.SysDictCtrl.Save)
	router.POST("/system/dict/deletes", sys_ctrl.SysDictCtrl.Deletes)
	router.GET("/system/dict/one", sys_ctrl.SysDictCtrl.One)
	router.GET("/system/dict/list", sys_ctrl.SysDictCtrl.List)
	router.GET("/system/dict/tree", sys_ctrl.SysDictCtrl.Tree)
	router.GET("/system/dict/sort", sys_ctrl.SysDictCtrl.Sort)
	router.GET("/system/dict/select", sys_ctrl.SysDictCtrl.Select)
	router.GET("/system/dict/sel-dept", sys_ctrl.SysDictCtrl.SelDepts)
	// 标签相关接口
	router.POST("/system/tag/save", sys_ctrl.SysTagCtrl.Save)
	router.POST("/system/tag/deletes", sys_ctrl.SysTagCtrl.Deletes)
	router.GET("/system/tag/page", sys_ctrl.SysTagCtrl.Page)
	router.POST("/system/tag/add", sys_ctrl.SysTagCtrl.Add)
	router.POST("/system/tag/delete", sys_ctrl.SysTagCtrl.Delete)
	// 文件相关接口
	router.POST("/system/file/upload", sys_ctrl.SysFileCtrl.Upload)
	router.POST("/system/file/image", sys_ctrl.SysFileCtrl.UpImg4We)
	router.POST("/system/file/video", sys_ctrl.SysFileCtrl.Upvd4We)
	router.POST("/system/file/deletes", sys_ctrl.SysFileCtrl.Deletes)
	router.POST("/system/file/download", sys_ctrl.SysFileCtrl.Download)
	router.POST("/system/file/upd-name", sys_ctrl.SysFileCtrl.UpdName)
	router.POST("/system/file/upd-type", sys_ctrl.SysFileCtrl.UpdType)
	router.GET("/system/file/one", sys_ctrl.SysFileCtrl.One)
	router.GET("/system/file/page", sys_ctrl.SysFileCtrl.Page)
	// 消息相关接口
	router.POST("/system/notice/process", sys_ctrl.SysNoteCtrl.Process)
	router.GET("/system/notice/one", sys_ctrl.SysNoteCtrl.One)
	router.GET("/system/notice/page", sys_ctrl.SysNoteCtrl.Page)
	router.GET("/system/notice/new", sys_ctrl.SysNoteCtrl.New)
	router.POST("/system/notice/read", sys_ctrl.SysNoteCtrl.Read)
	// 日志相关接口
	router.GET("/system/log/page", sys_ctrl.SysLogCtrl.Page)
	// 意见反馈相关接口
	router.POST("/system/feedback/save", sys_ctrl.FeedbackCtrl.Save)
	router.POST("/system/feedback/process", sys_ctrl.FeedbackCtrl.Process)
	router.GET("/system/feedback/one", sys_ctrl.FeedbackCtrl.One)
	router.GET("/system/feedback/page", sys_ctrl.FeedbackCtrl.Page)
	router.GET("/system/feedback/replied", sys_ctrl.FeedbackCtrl.Replied)
	// 资讯相关接口
	router.POST("/infor/save", info_ctrl.InfoCtrl.Save)
	router.POST("/infor/process", info_ctrl.InfoCtrl.Process)
	router.GET("/infor/one", info_ctrl.InfoCtrl.One)
	router.GET("/infor/page", info_ctrl.InfoCtrl.Page)
	router.GET("/infor/sort", info_ctrl.InfoCtrl.Sort)
	// 关键字相关接口
	router.POST("/infor/keyword/save", info_ctrl.KeywordCtrl.Save)
	router.POST("/infor/keyword/process", info_ctrl.KeywordCtrl.Process)
	router.GET("/infor/keyword/one", info_ctrl.KeywordCtrl.One)
	router.GET("/infor/keyword/page", info_ctrl.KeywordCtrl.Page)
}
